# from django import forms

# from captcha.fields import CaptchaField

# #用户登录
# class UserLoginForm(forms.Form):
#     Username = forms.CharField(required=True)
#     Password = forms.CharField(required=True, min_length=6)

# #用户注册
# class UserRegisterForm(forms.Form):
# 	# 用户名验证 字段需要与前端input的name属性保持一致
#     Username = forms.CharField(required=True)
#     # 密码验证 字段需要与前端input的name属性保持一致
#     Password = forms.CharField(required=True, min_length=6)
#     # 重复密码验证  字段需要与前端input的name属性保持一致
#     rPassword = forms.CharField(required=True)
#     # 验证码
#     captcha = CaptchaField(error_messages={"Invalid": u'验证码错误'})

from django import forms

from captcha.fields import CaptchaField


class UserLoginForm(forms.Form):
    Username = forms.CharField(required=True)
    Password = forms.CharField(required=True, min_length=6)


class UserRegisterForm(forms.Form):
    Username = forms.CharField(required=True)
    Password = forms.CharField(required=True, min_length=6)
    rPassword = forms.CharField(required=True)
    captcha = CaptchaField(error_messages={"Invalid": u'验证码错误'})


class UserPasswordForgetForm(forms.Form):
    Username = forms.CharField(required=True)
    captcha = CaptchaField(error_messages={"Invalid": u'验证码错误'})


class UserPasswordResetForm(forms.Form):
    Username = forms.CharField(required=True)
    Password = forms.CharField(required=True)
    rPassword = forms.CharField(required=True,min_length=6)